This resource address creates a new temporal collection for the named database.
URL Parameters | |
---|---|
format | The format of the posted data. Can be either
html , json , or xml (default). This value overrides
the Accept header if both are present. |
Request Headers | |
---|---|
Accept | The expected MIME type of the response. If the
format parameter is present, it takes precedence over the Accept header. |
Upon success, MarkLogic Server returns status code 202 (Accepted). If the collection already exists or if the payload is malformed, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-admin
rolehttp://marklogic.com/xdmp/privileges/manage-admin
http://marklogic.com/xdmp/privileges/manage
privilege, plus one of the following privileges:
http://marklogic.com/xdmp/privileges/admin/database
http://marklogic.com/xdmp/privileges/admin/database/database-ID
http://marklogic.com/xdmp/privileges/admin/database/temporal/database-ID
http://marklogic.com/xdmp/privileges/admin/database/database-name
http://marklogic.com/xdmp/privileges/admin/database/temporal/database-name
The structure of the data in the request body is shown here.
Note: The properties described here are for XML payloads. In general they are the same for
JSON, with the exception that, in JSON, options
is expressed in singular form.
For example, in JSON, options
is instead option
and the format is:
"option":["opt"]
.
collection-id
collection-name
system-axis
valid-axis
options
This is a complex structure with the following children:
option
cat temporal-collection.json ==> { "collection-name": "mycollectionnameuri", "system-axis": "mysystemaxisname", "valid-axis": "myvalidaxisname" } curl -X POST --anyauth -u admin:admin --header "Content-Type:application/json" \ -d @temporal-collection.json \ http://localhost:8002/manage/v2/databases/Documents/temporal/collections ==> Creates a temporal collection, named 'mycollectionnameuri," in the Documents database.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.